from dataclasses import dataclass

from src.application.order.dto.order import OrderDTO
from src.application.order.enums import OrderStatus, OrderType
from src.application.order.interfaces import GetOrdersFilters
from src.application.order.uow import OrderUoW
from src.domain.common.constants import Empty, OrderBy


@dataclass(frozen=True)
class GetUserSubscription:
    tg_user_id: int


class GetUserSubscriptionHandler:
    """Получаем подписку пользователя"""

    def __init__(self, *, uow: OrderUoW) -> None:
        self._uow = uow

    async def __call__(self, command: GetUserSubscription) -> OrderDTO:
        orders = await self._uow.order_reader.get_user_subscription_order(command.tg_user_id)

        return orders
